<template>
<view class='uni-icon' :style='style' />
</template>

<script setup lang="ts">
  import { IconProps } from '../props'
  import { useIconfont } from '../useIconfont'
  import { computed } from 'vue'
  const props = defineProps(IconProps)
  const {
  colors,
  svgSize,
  quot,
  isStr,
  } = useIconfont(props)
  const style = computed(() => {
      return `background-image: url(${quot.value}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize.value}px' height='${svgSize.value}px'%3E%3Cpath d='M352.972955 831.860239c-35.434907 0-63.989249 28.554342-63.989249 63.989249 0 35.434907 28.554342 63.989249 63.989249 63.989249s63.989249-28.554342 63.989249-63.989249C416.962204 860.414581 388.407862 831.860239 352.972955 831.860239L352.972955 831.860239z' fill='${(isStr.value ? colors.value : colors.value[0]) || 'rgb(87,91,102)'}' /%3E%3Cpath d='M801.069713 831.860239c-35.434907 0-63.989249 28.554342-63.989249 63.989249 0 35.434907 28.554342 63.989249 63.989249 63.989249s63.989249-28.554342 63.989249-63.989249C865.058962 860.414581 836.332605 831.860239 801.069713 831.860239L801.069713 831.860239z' fill='${(isStr.value ? colors.value : colors.value[1]) || 'rgb(87,91,102)'}' /%3E%3Cpath d='M937.304888 188.527465C920.963548 169.949941 898.429699 159.973123 874.003696 159.973123L232.907106 159.973123l-2.236183-13.073072c-5.676466-46.615824-46.615824-82.910801-93.231648-82.910801L97.015958 63.989249c-17.717453 0-31.994625 14.277171-31.994625 31.994625s14.277171 31.994625 31.994625 31.994625l40.251302 0c13.933143 0 28.210314 12.729044 29.930455 28.210314l30.96254 178.550647 54.356459 382.043339c5.676466 46.615824 46.099782 83.082815 92.371577 83.082815l520.17067 0c17.717453 0 31.994625-14.277171 31.994625-31.994625s-14.277171-31.994625-31.994625-31.994625L344.716278 735.876365c-13.589115 0-27.006215-12.55703-28.898371-27.522258l-5.332437-37.327062 507.61364-31.306568c46.099782 0 86.695112-36.466991 92.027549-81.362674L960.870821 270.062154C964.483118 239.271628 956.054426 209.513187 937.304888 188.527465z' fill='${(isStr.value ? colors.value : colors.value[2]) || 'rgb(87,91,102)'}' /%3E%3C/svg%3E${quot.value}); width: ${svgSize.value}px; height: ${svgSize.value}px;`
  })
</script>
